package com.surfin.safe.keyboard.view;

import android.content.Context;
import android.util.AttributeSet;

import androidx.annotation.NonNull;
import androidx.annotation.Nullable;
import androidx.appcompat.widget.AppCompatEditText;

import com.surfin.safe.keyboard.KeyMaster;
import com.surfin.safe.keyboard.R;

public class SafeEditText extends AppCompatEditText {
    public SafeEditText(@NonNull Context context) {
        this(context, null);
    }

    public SafeEditText(@NonNull Context context, @Nullable AttributeSet attrs) {
        this(context, attrs, R.attr.editTextStyle);
    }

    public SafeEditText(@NonNull Context context, @Nullable AttributeSet attrs, int defStyleAttr) {
        super(context, attrs, defStyleAttr);
    }

    public String getEditString() {
        return KeyMaster.getInstance().getEditString(String.valueOf(getId()));
    }

    @Override
    public boolean onTextContextMenuItem(int id) {
        return true;
    }

    @Override
    public void setLongClickable(boolean longClickable) {
        super.setLongClickable(false);
    }
}
